<template>
  <span>
    <el-tag class="tag" size="mini">{{ typeVal }}</el-tag>
  </span>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      required: true
    }
  },
  data(){
    return{
      typeVal: []
    }
  },
  created() {
    this.typeVal = this.getStatus(this.value);
  },
  methods: {
    getStatus(value){
      switch (value) {
        case '1':
          return 'Text';
          break;
        case '2':
          return 'String';
          break;
        case '3':
          return 'Number';
          break;
        case '4':
          return 'Integer';
          break;
        case '5':
          return 'Float';
          break;
        case '6':
          return 'Double';
          break;
        case '7':
          return 'Date';
          break;
        case '8':
          return 'DateTime';
          break;
        case '9':
          return 'TimeStamp';
          break;
        case '10':
          return 'Boolean';
          break;
        default:
          break;
      }
    }
  }
}
</script>

<style scoped>
.tag{
  margin-right: 5px;
}
</style>
